var map = initMap();
    var cor_hour = -1;
    var point = new BMapGL.Point(110.340739,19.968249);
    map.centerAndZoom(point, 13);
    map.setHeading(30);

    var view = new mapvgl.View({
        map: map
    });

    var grid = new mapvgl.HeatGridLayer({
        max: 80, // 最大阈值
        min: 10, // 最小阈值
        // color: function() {
        //     return 'rgb(200, 255, 0)';
        // },
        gridSize: 500,
        // style: 'normal',
        gradient: { // 对应比例渐变色
            0: 'rgb(50, 50, 256)',
            0.3: 'rgb(178, 202, 256)',
            1: 'rgb(250, 250, 256)'
        },
        riseTime: 100, // 楼块初始化升起时间
        maxHeight: 10000, // 最大高度
        minHeight: 200 // 最小高度
    });
    view.addLayer(grid);

    var int=self.setInterval("draw()",1000);

    function draw(){

        cor_hour = cor_hour + 1
        if (cor_hour > 24){
            cor_hour = 1
            // int=window.clearInterval(int)
        }

        document.getElementById("fname").value = '2017-05-01  ' + cor_hour.toString() + ':00';

        fetch('./data/start_data/2017-05-01-start.json').then(rs => {
            return rs.json();
        }).then(rs => {

            var arr = [
                rs.result.data.hour0,
                rs.result.data.hour1,
                rs.result.data.hour2,
                rs.result.data.hour3,
                rs.result.data.hour4,
                rs.result.data.hour5,
                rs.result.data.hour6,
                rs.result.data.hour7,
                rs.result.data.hour8,
                rs.result.data.hour9,
                rs.result.data.hour10,
                rs.result.data.hour11,
                rs.result.data.hour12,
                rs.result.data.hour13,
                rs.result.data.hour14,
                rs.result.data.hour15,
                rs.result.data.hour16,
                rs.result.data.hour17,
                rs.result.data.hour18,
                rs.result.data.hour19,
                rs.result.data.hour20,
                rs.result.data.hour21,
                rs.result.data.hour22,
                rs.result.data.hour23
            ]


            rs = arr[cor_hour];
            var data = [];
            for (var i = 0; i < rs.length; i++) {
                var item = rs[i];
                data.push({
                    geometry: {
                        type: 'Point',
                        coordinates: [item[0], item[1]]
                    },
                    properties: {
                        count: item[2]
                    }
                });
            }
            grid.setData(data);
        });
    }